package com.weds.frame.common.util;

import java.util.Objects;

/**
 * Description:
 * Author: LiuWenQing
 * Datetime: 2023/4/4 17:13
 */
public class PattenUtil {

    public static String handleLogDesc(String templateStr, Object... o) {
        int length = o.length;
        for (int i = 0; i < length; i++) {
            if(Objects.nonNull(o[i])
                    &&templateStr.contains("{"+i+"}")){
                templateStr = templateStr.replace("{"+i+"}",o[i].toString());
            }
        }
        return templateStr;
    }
}
